#include <global.h>
#include "getAmmo_cv.h"
#include "CSerialPort.h"
#include "DataStruct.h"
using namespace cv;
using namespace std;
DataStruct send_data = {0, 0, 0, 0, 0x5A};
char mode = 0x04;

int main()
{
	VideoCapture cap(0);
	FindAmmo ammol;
	Mat frame;
	while (1)
	{
		cap >> frame;
		cout << "0.2 ";
		if (mode == 0x02)
			ammol.getAmmo_17_42(frame);
		if (mode == 0x04)
			ammol.getAmmo_42(frame);
		cout<<endl;
	}
	return 0;
}
